//
//  SearchBar.m
//  SinaWeibo
//
//  Created by Apple on 16/8/10.
//  Copyright © 2016年 Apple. All rights reserved.
//

#import "SearchBar.h"

@implementation SearchBar


-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self == [super initWithFrame:frame]) {
        
        //文本框默认不显示，要设置他的边框
        self.borderStyle = UITextBorderStyleRoundedRect;
        
        self.placeholder = @"请输入你要搜索的内容";
        
        self.leftView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"searchbar_searchlist_search_icon"]];
        
        
        self.leftViewMode = UITextFieldViewModeAlways;
        
        //清除按钮
        self.clearButtonMode = UITextFieldViewModeWhileEditing;
        
    }
    return self;
    
}



@end
